package com.lostandfound.mapper;

import com.github.pagehelper.Page;
import com.lostandfound.pojo.Recruit;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;

@Mapper
public interface RecruitMapper {

    Page<Recruit> list(String name, LocalDate begin, LocalDate end);

    @Select("select * from recruit where id=#{id};")
    Recruit findById(Integer id);

    @Delete("delete from recruit where id=#{id};")
    void delete(Integer id);

    void update(Recruit recruit);
}
